<?php 

class ProductAction extends BaseAction{


	/**
	 * 首页
	 * @return [type] [description]
	 */
	function index(){
		$cid = I('cid') ? I('cid') : 2;
		$cate = M('category')->where(['id'=>$cid])->find();
		$where['path'] = ['like',$cate['path'].'%'];
		$content = M('content')->where($where)->select();
		$this->assign('list',$content);
		$this->assign('cate',$cate);
		$this->display();
	}

	/**
	 * 详情页
	 * @return [type] [description]
	 */
	function detail(){
		$id = I('id');
		$content = M('content')->where(['id'=>$id])->find();
		$this->assign('info',$content);
		$this->display();
	}

	/**
	 * 联系我们
	 * @return [type] [description]
	 */
	function contact(){
		$this->display();
	}

	

}

?>